# Molecular dynamics (MD) and transition path sampling (TPS) simulations of alanine dipeptide

## Folder structure

- C5_C7  C7_Cax : TPS simulation
- md : Molecular dynamics simulations
- tps : source code for TPS

## Files

### MD data

- md.in : lammps input script
- log.lammps : lammps logfile
- md.dat : lammps input structure
- md.energy : energies of the trajectory
- md.intc : internal coordinations of the trajectory
- md.lammpstrj : lammps output structures of the trajectory
- md-plumed.dat : PLUMED input
- md-plumed.out : PLUMED screen output

### TPE data

To reproduce the simulation, export lammps executable name as LMP_EXEC to the bash environment. And run

```bash
python ../tps/transition_path_sampling.py
```

The basic settings, such as temperature, langevin damping factors, total number of steps, timestep can be revised at the beginning of the python file.

data.npz is  the npz file that store all TPS trajectories. The keys are explained as below.

- pe: potential energies 
- intc: 22 internal coorindates, defined in the plumed.script style as below
- xyz: cartesian coordinations
- col: conventional torsion angles $\phi$ and $\theta$, the same as the second(t2), and third(t3) columns of the intc matrix (given counter starts from 1).

initial.npz is the npz file that contain one complete reaction path, used as the initial trajectory of TPS. The keys are explained as below.

- pe: potential energies 
- intc: 22 internal coorindates, defined in the plumed.script style as below
- xyz: cartesian coordinations
- vel: velocities in cartesian space
- label: 0, 1, or 2. 0 for C5, 1 for C7 and 2 for Cax state
- alle: thermo output of lammps. Each column represents step, temperature, potential energy, kinetic energy and total energy. 

```plumedscript
t1: TORSION ATOMS=2,5,7,9 NOPBC
t2: TORSION ATOMS=5,7,9,15 NOPBC
t3: TORSION ATOMS=7,9,15,17 NOPBC
t4: TORSION ATOMS=9,15,17,19 NOPBC
t5: TORSION ATOMS=17,15,9,11 NOPBC
t6: TORSION ATOMS=11,9,7,5 NOPBC
d1: DISTANCE ATOMS=19,17 NOPBC
d2: DISTANCE ATOMS=17,15 NOPBC
d3: DISTANCE ATOMS=15,9 NOPBC
d4: DISTANCE ATOMS=9,11 NOPBC
d5: DISTANCE ATOMS=9,7 NOPBC
d6: DISTANCE ATOMS=7,5 NOPBC
d7: DISTANCE ATOMS=5,2 NOPBC
d8: DISTANCE ATOMS=14,16 NOPBC
d9: DISTANCE ATOMS=5,6 NOPBC
a1: ANGLE ATOMS=9,17,15 NOPBC
a2: ANGLE ATOMS=17,15,9 NOPBC
a3: ANGLE ATOMS=15,9,7 NOPBC
a4: ANGLE ATOMS=9,7,5 NOPBC
a5: ANGLE ATOMS=7,5,2 NOPBC
a6: ANGLE ATOMS=15,9,11 NOPBC
a7: ANGLE ATOMS=11,9,7 NOPBC
PRINT ARG=* STRIDE=100 FILE=hello.intc
FLUSH STRIDE=100
```

